import actions from '../actions/chat'
import mutations from '../mutations/chat'
export const  chat = {
    state:{
        msgMap:{} ,//消息记录 sessionId 为key
        currentMsgList:[],//当前正在聊天的消息队列
        sessionMap:{},//会话Map sessionId 为key
        sessionList:[], //会话列表,
        userInfoMap:{}, //userId 为key
        groupInfoMap:{} //groupId 为 key
    },
    getters:{
        currentMsgList: state=>{
            return state.currentMsgList
        },
        sessionList:state=>{
            return state.sessionList
        },
        userInfoMap:state=>{
            return state.userInfoMap
        },
        groupInfoMap:state=>{
            return state.groupInfoMap
        }
    },
    actions:actions,
    mutations:mutations
}